package com.org.redis.pubandsub;

import com.org.redis.config.JedisUtils;
import redis.clients.jedis.Jedis;

/**
 * 消息发送者
 * @author wang
 */
public class MsgProvider {

    public static void main(String[] args) {
        Jedis jedis = JedisUtils.getJedis();
        for (int i=1;i<=1000;i++){
            jedis.publish("redis-pubsub","hello,"+i);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
